<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<title>Login Page</title>
<style>
.errorblock {
	color: #ff0000;
	background-color: #ffEEEE;
	border: 3px solid #ff0000;
	padding: 8px;
	margin: 16px;
}
</style>
</head>
<body onload='document.f.j_username.focus();'>
	<h3>Login with Username and Password (Custom Page)</h3>

	<c:if test="${not empty error}">
		<div class="errorblock">
			用户名或密码错误，请重新登录！
		</div>
	</c:if>
	
	<c:if test="${not empty denied}">
		<div class="errorblock">
			您没有权限使用本系统，请更改用户名后重新登录！
		</div>
	</c:if>

	<form name='f' action="<c:url value='j_spring_security_check' />"
		method='POST'>

		<table>
			<tr>
				<td>用户名</td>
				<td><input type='text' name='j_username' value=''>
				</td>
			</tr>
			<tr>
				<td align="left">密码</td>
				<td><input type='password' name='j_password' />
				</td>
			</tr>
			<tr>
				<td colspan='2' align="center">
					<input name="submit" type="submit"	value="提交" />
					<input name="重置" type="reset" />
				</td>
			</tr>
		</table>

	</form>
</body>
</html>